[ create a new paste ] login | about

Link: http://codepad.org/2NTS0XmK    [ raw code | fork ]

Plain Text, pasted on Aug 2:
; orx - Tutorial config file
; Should be used with orx v.1.4+

[Display]
ScreenWidth   = 800
ScreenHeight  = 600
Title         = Object Tutorial
Smoothing = false ; 
[RenderViewport] 
BackgroundColor = (0, 0, 0); Better to define a background (ie. clear) color, helps some hardware with optimization 
Size = (200, 150, 0); Here we define our viewport size, which in turn will define the texture size 
; We set it low-res so that, with our display target resolution, each pixel will look 4x4 
Texture = RenderTexture; Pick whichever name you want as long as it's not an existing file on disk :) 
Camera = Camera; Use your regular game camera here 
 
[ScreenViewport] 
BackgroundColor = (0, 0, 0) 
ShaderList = @; Hey, we're using a shader to do the compositing, also we don't need a camera as we're not rendering a scene :) 
Code = "void main() 
{ 
  // Simply copy the pixel from texture 
  gl_FragColor = texture2D(texture, gl_TexCoord[0].xy); 
}" 
ParamList = texture 
texture = RenderTexture; It's here that we link the texture used as input for our shader to the one used as target when rendering our scene with RenderViewport, so make sure to use the same name as previously :) 

[Game] 
ViewportList = RenderViewport # ScreenViewport; Let's go data-driven all the way down!

[Render]
ShowFPS = true ;
;ShowProfiler = true;
[Input]
SetList = MainInput

[MainInput]
KEY_ESCAPE = Quit

[Viewport]
Camera            = Camera
;RelativePosition  = bottom right
;Position          = (100, 100, 0); NB: Position is in pixels and will be ignored if RelativePosition is specified
;RelativeSize      = (0.5, 0.5, 0.0)
;Size              = (200, 150, 0) NB: Size is in pixels and will be ignored if RelativeSize is specified
;BackgroundColor   = (255, 180, 0)

[Camera]
; We use the same size for the camera than our display on screen so as to obtain a 1:1 ratio
FrustumWidth  = @Display.ScreenWidth
FrustumHeight = @Display.ScreenHeight
FrustumFar    = 1.0
FrustumNear   = 0.0
Position      = (0.0, 0.0, -1.0)
;Zoom          = 3.0
;Rotation      = 45
[Object]
Graphic         = Graphic
;Color           = (255, 0, 200)
;Alpha           = 0.4
;Flip            = y
Position        = (00,00,0)
;Rotation        = 90
;Scale           = (3.0, 1.0, 1.0) NB: z is ignored for 2D objects
;Smoothing       = true
;BlendMode       = add
;AngularVelocity = 90
;Speed           = (100, 0, 0)

[Text]
String = Why should we use a texture when we can use a text?!

[Graphic]
Texture       = demoiselle.png
;Text          = Text; <= If you want to see the text, you need to comment out the texture
Pivot         = center
;TextureCorner = (50, 20, 0) NB: z is ignored
;TextureSize   = (50, 80, 0) NB: z is ignored
;Repeat        = (3.0, 2.0, 0.0)
;Flip          = both
;Color         = (0, 0, 255)
;Alpha         = 0.6
;Smoothing     = true




Create a new paste based on this one


Comments: