Skip to main content
gamedev.net
🔒 Locked

Render texture without render texture?

Started by CJM 1 reply 950+ views
Original Post
CJM
CJM
Hey, I'm currently working on [some lighting] stuff that currently renders a screen-sized texture and then blends it with the current main screen. However, one of the low-end machines that I'm using for development and test doesn't support any of the render texture extensions [laptop with crappy intel integrated graphics]. I was curious as to whether or not anyone had any way of mimmicking my special case on mediocre hardware. Basically, I need to render two scenes seperately, and then blend them together [using a multiplicative blend...]. Both scenes are exactly the same size, the size of the GL output viewport, though either could be reduced to powers-of-two if need be. I can render each of the two scenes completely independently. Is there any faster way than: rendering the first scene, copying all of the pixels out [glCopyPixels], turning said pixels into a new texture, clearing the output viewport, rendering the second scene, blending the [first scene] texture over the current scene. I don't think it will be of particular help, but this is a full list of the extensions that I do have access to [on this machine][I really don't have too much to work with]:

    GL_ARB_multitexture
    GL_ARB_point_parameters
    GL_ARB_texture_border_clamp
    GL_ARB_texture_compression
    GL_ARB_texture_cube_map
    GL_ARB_texture_env_add
    GL_ARB_texture_env_combine
    GL_ARB_texture_env_dot3
    GL_ARB_texture_env_crossbar
    GL_ARB_transpose_matrix
    GL_ARB_vertex_program
    GL_ARB_window_pos
    GL_EXT_abgr
    GL_EXT_bgra
    GL_EXT_blend_color
    GL_EXT_blend_func_separate
    GL_EXT_blend_minmax
    GL_EXT_blend_subtract
    GL_EXT_clip_volume_hint
    GL_EXT_compiled_vertex_array
    GL_EXT_cull_vertex
    GL_EXT_fog_coord
    GL_EXT_multi_draw_arrays
    GL_EXT_packed_pixels
    GL_EXT_packed_pixels_12
    GL_EXT_rescale_normal
    GL_EXT_secondary_color
    GL_EXT_separate_specular_color
    GL_EXT_stencil_wrap
    GL_EXT_texture_compression_s3tc
    GL_EXT_texture_env_add
    GL_EXT_texture_env_combine
    GL_EXT_texture_lod_bias
    GL_EXT_texture_filter_anisotropic
    GL_3DFX_texture_compression_FXT1
    GL_IBM_texture_mirrored_repeat
    GL_NV_blend_square
    GL_NV_texgen_reflection
    GL_WIN_swap_hint
    GL_SGIS_generate_mipmap

Although I don't care if the implementation runs in realtime, i'm still quite interested in making this part work as fast as possible on this old hardware [as I could just update one of the images at a much lower rate]. Or, if there are any other non-rendertexture extensions that would make my job easier on other older hardware, then it would be great if you'd be able to mention them. Cheers, CJM
zedzeek
zedzeek
render into the backbuffer and use glCopyTexSubImage2d(..) to update an already existing texture
nearly as fast as FBO (my testing shows updating a texture with FBO is only ~5% quicker than glCopyTexSubImage2d)
CJM
CJM
Thanks!

--CJM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.