Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - signifer123

#1
Support / Re: Texture Size
August 13, 2009, 04:43:06 AM
It says "OpenGL renderer initialized (using 4 texture stages)" shows in stdout and i'm using buffer.displayGLOnly(); to present the data. The rendering only seems to take fairly long when using replaceTexture or addTexture. I guess i'll just leave to my processor not being powerful enough for such a thing yet. The blitting is fast enough but it takes about 70% CPU for the whole render loop that way.
#2
Support / Re: Texture Size
August 12, 2009, 05:46:05 AM
Unfortunately that resulted in being about as slow as scaling it, even without U/V. I went in and timed some stuff the grabbing of the image took between 7 and 25 ms, the clearing and applying to a new image took 7-12 ms, but whole process of replacing the texture would take either about 56 ms and ~207 ms alternating between the two the entire time:

~56,~207,~56,~207,~56,~207


If i do everything except replace the texture i get about 60 ms for the whole render loop, using drawing onto the buffer. So i feel my question should be reformated to can i use a texture without texture manager?
#3
Support / Texture Size
August 12, 2009, 04:25:48 AM
Edit: It appears after some code profiling that TextureManager adding a new texture is the cause of the slowdown not the resizing. Is there a way to bypass TextureManager?

I'm tinkering with the ability to take frames directly out of a video stream via a DirectShow wrapper, and place them as a texture, this works fine when just presenting to a JPanel, but when it's resized to place as a texture on a Plane it causes my CPU to not be able to keep up. Is there anyway to change the size textures to be larger than 256x256 by default? Though the movie i was testing with is 720x540, so i suppose some form of sampling would be required? Would there be a better way to render a video to 3d?

Currently, i use a frame grab, which returns a AWT.Image, then i use that to replace the texture in the textureManager.

Or perhaps a way to resize on the GPU?