|
Setup a timer and call your render code from that. In your render code call the proper invalidate function to get the WM_PAINT message sent. Just remember there's not much reason to set the timer faster than your monitor can refresh the frame or you be spending rendering cycles you won't see. This way you'll get an orderly, controllable stream of screen updates and rendering cycles.
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke
|
|
|
|
|
i'll do that,
my problem was that i wasn't using invalidate function (i didn't know about other invalidate functions, just about that that is in MFC)
|
|
|
|
|
Thanks for help everyone,
and the next time i'll keep it simple, and not write an essay about my problem XD
|
|
|
|
|
I use glNewList() to load my drawing data, because the data is too large, i put the glNewList() into multithread, but it draw nothing using glCallList() after created the glNewList().
but if i put the glNewList() into the main thread , it draw successfully.
what is the matter? thanks.
|
|
|
|
|
Please check in which thread you have created your OpenGL rendering context.
If it is in your main thread, you cannot use OpenGL calls from another thread.
If you need to do so, you will have to create seperate context for each thread and should share the context using wglShareList.
Please note that when using wglShareList the shared contexts should be made the current context of the corresponding thread using wglMakeCurrent.
|
|
|
|
|
My team and I are slaving tirelessly trying to find an answer to this one:
The guys at Ozone3D Graphics (creators of GPU Caps Viewer) have shown that it is possible to determine the number of shading processors on a GPU, and their type - example, "96 Unified SP"
We need to do just that for a medical imaging application we are working on. The number is all that's really important. I am at a loss though... The registry does not seem to contain this data, and I cannot find any evidence the OpenGL can query it.
Does anyone know how to programmatically query specifications of graphics hardware? Specially, the number of shading processors on board?
I would be very grateful for any tips.
|
|
|
|
|
Please have a look on my doubt. i want to develop a SIP fone application.I think the sip communication is supported by Adobe Flash , no need to use an extra SIP stack to implement this.is it correct or not???if i am wrong, how to solve this???
Thanks in advance..
|
|
|
|
|
I have an application that needs to be able to convert a jpeg into hex ascii, and then put that hex ascii into a postscript file. I know of one way to put this jpeg into postscript, but that's without using the jpeg's hex - instead, it uses a local path to a filename. I need to know two things:
1. Within a jpeg, how can I extract the hex ascii to use in postscript, in a way that postscript will understand it? Do I need all the header information? If anyone has done this before, please shed some insight. I have found the red book to be not as helpful for this specific problem as I would like.
2. Within said postscript file, how do I enter the hex of the jpeg back so that it will display properly?
Thank you very much.
|
|
|
|
|
Is it possible in opengl to get a textures pixel dimensions (what was passed in to the glTexImage2D function) given a texture handle (what's returned by glGenTextures)?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
write a fragment shader, read the results in texture coordinates.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
|
|
|
|
|
What about outside of a frag shader? What if I've got some code that has a handle to texture, is there a way to get the textures pix dimensions?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Does anyone know of a good utility that can automatically compress JPEG images that a user uploads to the server?
For instance, a user uploads a photograph that is 2 MB, and the utility automatically compresses it to take up only 20 KB at a slight loss of picture quality (after the upload is complete).
|
|
|
|
|
You do know that JPEG is a compressed format already? You can, however, reprocess it and resave a higher compression ratio obviously with more loss. Your mileage may vary.
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke
|
|
|
|
|
|
I believe that's the .Net wrapper for GDI+ and they have reasonable image handling but I avoid everything C# as a matter of policy.
"Republicans are the party that says government doesn't work and then they get elected and prove it." -- P.J. O'Rourke
|
|
|
|
|
I'm trying to render multiple fragment shaders in opengl, something like this:
in-img-tex1 --> shader1 --> result --> shader2 --> render tex
I have all the code working for rendering a texture with a single shader working. However when I add a second, it doesn't do anything. I suspect I'm
a) misunderstanding how this is supposed to work
b) not using the correct techniques
The way I'm doing this is to create tex1, load up the image into it. then make it the active text at slot 0. Make the shader program active (glUseProgramObjectARB), bind the texture, and then draw the rectangle where the texture will go. I then repeat this, using the second shader program.
What I'm trying to emulate is Apple's CoreImage, the idea of being able to specify a graph of operations, say:
in-image --> adjust-hue-filter --> gaussian-blur-filter --> out-image
or
in-image1
\
\
+-------------------------+--> mix-filter --> out-image
/
+--> motion-blur-filter -+
/
in-image2
If you can't run 1 shader after the other on a texture, is another way to do something like this?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
multi-pass rendering: http://people.csail.mit.edu/ericchan/papers/rds/[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
John Andrew Holmes "It is well to remember that the entire universe, with one trifling exception, is composed of others."
|
|
|
|
|
Thanks, I had a look at the paper, haven't fully read it yet though. However before I got your suggestion I came across Frame Buffer Objects, which, so far, seem to perfectly fit the bill. What I do is create a single FBO, then walk the filter graph, with the output of the filter being assigned to the FBO's texture, and then rendering the filters input plus the filter's shader into the FBO. The next filter will have the output of the prev filter as it's input, so I can accumulate the results. Then I turn the FBO off, and just dump the output texture to the screen and voila! it works perfectly.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
How to put Pictire on the button ???
|
|
|
|
|
Its not a graphic question but you can load your image with LoadImage and then you need to use of SetBitmap.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I have checked all the blogs and even in codeproject, a dll is used but it is commercial one, i want open source or freeware, is there any conversion logic or dll(not commmercial).
Please help me.
Thanks in advance
|
|
|
|
|
For goodness sake Google it. There are thousands of hits for 'pdf conversion' not least of which is ITextSharp.
Henry Minute
If you open a can of worms, any viable solution *MUST* involve a larger can.
|
|
|
|
|
Hi all,
I want to draw a line with patter "----- -- "( 1111100011000 ). The problem is that, the glLineStipple() function accepts pattern in short variable(16 bits). But in my case there is only 13 bits.
Is there any method to draw a line with the above pattern?
Thanks
|
|
|
|
|
Not directly, but you could play with the bit pattern and the scale to make your pattern fit, using the following equation,
pattern bit ( counter / factor ) mod 16
|
|
|
|
|
Thanks.
I saw this equation in MSDN. But didnt understand the equation correctly. Could you please elobarate it? Does this eqation mean
pattern bit * ( counter / factor ) mod 16
Also what is this counter? How can I change its value?
Thanks
|
|
|
|