gg: remove obsolete usages of `use_ortho: true`

pull/10559/head
Delyan Angelov 2021-06-24 11:07:09 +03:00
parent cc91d9bee3
commit f18265e6a8
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
19 changed files with 17 additions and 36 deletions

View File

@ -109,7 +109,6 @@ fn main() {
height: app.ui.height
window_title: 'Fireworks!'
bg_color: gx.black
use_ortho: true
user_data: app
frame_fn: on_frame
event_fn: on_event

View File

@ -185,7 +185,6 @@ fn main() {
bg_color: gx.white
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'flappylearning-v'
frame_fn: frame

View File

@ -48,7 +48,6 @@ fn main() {
user_data: &app
width: screen_width
height: screen_height
use_ortho: true
create_window: true
resizable: false
window_title: 'v life (with gg, gx)'

View File

@ -74,7 +74,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'Empty window'
user_data: app

View File

@ -23,7 +23,6 @@ fn main() {
bg_color: gx.white
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'Rectangles'
frame_fn: frame

View File

@ -30,7 +30,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'Counter'
user_data: app

View File

@ -37,7 +37,6 @@ fn main() {
width: window_width
height: window_height
font_size: 20
use_ortho: true
user_data: game
window_title: 'Hot code reloading demo'
create_window: true

View File

@ -23,7 +23,6 @@ fn main() {
width: size
height: size
font_size: 20
use_ortho: true
user_data: context
window_title: 'Graph builder'
create_window: true

View File

@ -211,7 +211,6 @@ fn main() {
user_data: &app
width: canvas_size
height: top_height + canvas_size
use_ortho: true
create_window: true
resizable: false
window_title: 'snek'

View File

@ -418,7 +418,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: '3D Cube Demo'
user_data: app

View File

@ -612,7 +612,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: '3D Cube Demo'
user_data: app

View File

@ -423,7 +423,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: '3D Ray Marching Cube'
user_data: app

View File

@ -619,7 +619,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: '3D Dual shader Cube - click and rotate with the mouse'
user_data: app

View File

@ -506,7 +506,6 @@ fn main(){
app.gg = gg.new_context({
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'Instancing Cube'
user_data: app

View File

@ -323,7 +323,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'V Wavefront OBJ viewer - Use the mouse wheel to zoom'
user_data: app

View File

@ -44,7 +44,6 @@ fn main() {
bg_color: gx.rgb(50, 50, 50)
width: 1024
height: 400
use_ortho: true
create_window: true
window_title: 'ByteBeat Music'
frame_fn: graphics_frame

View File

@ -167,7 +167,6 @@ fn main() {
bg_color: gx.white
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'V Tetris' //
user_data: game

View File

@ -123,7 +123,6 @@ fn main() {
app.gg = gg.new_context(
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'Test TTF module'
user_data: app

View File

@ -53,7 +53,7 @@ In this modue it is possible to have different renders running at the same time.
At the present time all the rendering are made on the CPU, sokol is used only to draw the
rendered text to the screen.
Let's start with a simple snippet of code:
```v ignore
```v oksyntax
import os
import x.ttf
[console]
@ -70,7 +70,7 @@ This simple code load a TTF font and display its basic informations.
### draw_text
The draw text function draw simple strings without indentation or other imagination tasks.
At this point we can render a simple text:
```v ignore
```v oksyntax
import os
import x.ttf
@ -122,7 +122,7 @@ Using the low level rendering you need to manage all the amenities like allocate
memory and other tasks like calc the character dimensions.
You can specify the style for the text rendering in the `BitMap` struct::
```v ignore
```v
enum Style {
outline
outline_aliased
@ -134,7 +134,7 @@ Use this level only if you want achieve particular result on text rendering.
### draw_text_block
Draw text block draw a justified and indented block of multiline text in the bitmap.
```v ignore
```v oksyntax
import os
import x.ttf
@ -186,7 +186,7 @@ But Vwill prevail for sure, V is the way!!
```
This is the low level render that draw text block on the bitmap.
A text block is defined from a `Text_block` struct:
```v ignore
```v
struct Text_block {
x int // x postion of the left high corner
y int // y postion of the left high corner
@ -196,7 +196,7 @@ struct Text_block {
}
```
and use the following bitmap fields:
```v ignore
```v oksyntax
style Style = .filled // default syle
align Text_align = .left // default text align
justify bool // justify text flag, default deactivated
@ -211,7 +211,7 @@ the text to the screen.
It is mor esimpel to use in a `gg app` that the raw bitmap render.
Each single text rendered need its own reder to be declared, after you can modify it.
Here a simple example of the usage:
```v ignore
```v oksyntax
import gg
import gx
import sokol.sapp
@ -275,7 +275,6 @@ fn main(){
app.gg = gg.new_context({
width: win_width
height: win_height
use_ortho: true // This is needed for 2D drawing
create_window: true
window_title: 'Test TTF module'
user_data: app